var i=0;
function startCount()
{
    i=i+1;
    //document.getElementById("result").innerHTML=i.toString();
    postMessage(i);
    setTimeout("startCount()",500);
}
startCount();